import request from '@/utils/request'

export default {

  /**
   * 添加小节
   * @param {*} video 
   * @returns 
   */
  addVideo(video) {
    return request({
      url: '/edu/videos/addVideoChapter',
      method: 'post',
      data: video
    })
  },

  /**
   * 更新小节
   * @param {*} id 
   * @returns 
   */
  updateVideo(video) {
    return request({
      url: '/edu/videos/updateVideoChapter',
      method: 'post',
      data: video
    })
  },

  /**
   * 根据ID获取小节信息
   * @param {*} videoId 
   */
  getVideo(videoId) {
    return request({
      url: `/edu/videos/getVideo/${videoId}`,
      method: 'get'
    })
  },

  /**
   * 删除小节
   * @param {*} id 
   * @returns 
   */
  deleteVideo(id) {
    return request({
      url: '/eduService/video/deleteVideoById/' + id,
      method: 'delete'
    })
  },


}